package ml.kupin.service;

import ml.kupin.pojo.TbItem;
import ml.kupin.pojo.TbItemDesc;
import ml.kupin.common.utils.KuPinResult;
import ml.kupin.common.vo.EasyUIDataGridResult;

import java.util.List;

/**
 * Created by 小柯(Allen Kerr) on 17.4.24 14:44.
 */
public interface ItemService {

    TbItem getItemById(Long id);

    EasyUIDataGridResult<TbItem> getItems(int page, int rows);

    KuPinResult addItem(TbItem item, String desc) throws Exception;

    /**
     * 商品上架、下架、删除功能
     *
     * @param id
     * @return
     * @throws Exception
     */
    KuPinResult updateStatus(long id, byte status) throws Exception;

    KuPinResult findItemDesc(long itemId);

    KuPinResult updateItem(TbItem item, String desc) throws Exception;

    TbItemDesc getItemDescById(Long id);

    List<TbItem> findAll();
}
